<!-- #a7bbcd -->
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>{{title}}</title>
    <!-- 引入css初始化文件 -->
    <link rel="stylesheet" href="{{static_url('css/normalize.css')}}" type="text/css" />
    <!-- 专属的首页样式 -->
    <link rel="stylesheet" href="{{static_url('css/login.css')}}" type="text/css" />      
</head>
<body>
    <div class="wrapper">
        <div class="head">
                <ul class="fl">
			<li><img src="{{static_url('image/xiaotujia.png')}}"></li>
                    <li class="space"></li>
                    <li><span class="bigger">登录</span></li>
                </ul>
                <ul class="fr">
                    <li><span >我还没有小土家账号，马上</span></li>
                    <li><a href="/register">注册</a></li>
                </ul>
        </div>
        <div class="nav"></div>
        <div class="content">
            <div class="mod-reg">
                <div class="reg-content">
                    <div class="name" > 用&ensp;户&ensp;名： 
                    <input type="text" id="username" name="username" placeholder="请输入用户名" class=""> 
                    </div>
                    <div class="code" > 密&emsp;&emsp;码： 
                    <input type="password" id="password" name="password" placeholder="请输入密码" class=""> 
                    </div>
                    <div class="submit" > 
                    <input type="button" id="submitbutton" name="" value="登&nbsp&nbsp录" class="submitbutton"> 
                    </div>
                </div>
                <div class="picture"></div>
            </div>
        </div>
        <div class="foot">
            <div class="link">
              <p>
                <a href="#">关于小土家</a>
                <span>|</span>
                <a href="#">常见问题</a>
                <span>|</span>
                <a href="#">违规投诉</a>
                <span>|</span>
                <a href="#">开放平台</a>
                <span>|</span>
                <a href="#">用户协议</a>
                <span>|</span>
                <a href="#">客服电话：</a>
                <a class="c" href="#">400-9216-666</a>
             </p>
            </div>
        </div>
    </div>
</body>
<script src="{{static_url('js/jquery-3.2.1.min.js')}}"></script>
	<script>
		$(function(){
			$('#submitbutton').click(function(){
			$.ajax({
				url: '/login',
				method: 'post',
				data: {
					"username": $('#username').val(),
					"password": $('#password').val()
				},
				success: function(data){
					if(data.status){
						window.location.href='/';
					}
				}
			})
			})
		})
	</script>
</html>
